using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Runtime.Serialization;
using System.Collections;
using System.Data;
using System.ComponentModel;
using System.Data.OracleClient;
using WPFExcelReport.Helpers;
using WPFExcelReport.Controls;
namespace WPFExcelReport
{
    public partial class VVLWEG
    {
        public DataRow Convert2VLWEG(DataRow dwInput, string ITXDBVERSION, bool IsConvert = false)
        {
            DataSet SResult = new DataSet();
            SResult = QueryVLWEG(dwInput, 0);
            DataRow dwReturn = null;
            if (SResult.Tables[0].Rows.Count > 0)
            {
                dwReturn = SResult.Tables[0].Rows[0];
            }
            else
            {
                dwReturn = SResult.Tables[0].NewRow();
            }
            switch (ITXDBVERSION)
            {
                case "YGR":
                    #region=========
         dwReturn["VLWMANDANT"] = " ".PadRight(2 ); 
         dwReturn["VLWLANDVON"] = " ".PadRight(3 ); 
         dwReturn["VLWPLZVON"] = " ".PadRight(12 ); 
         dwReturn["VLWLANDAN"] = " ".PadRight(3 ); 
         dwReturn["VLWZONE"] = " ".PadRight(4 ); 
         dwReturn["VLWKDVKL"] = " ".PadRight(3 ); 
         dwReturn["VLWKUNDNR"] = " ".PadRight(8 ); 
         dwReturn["VLWADRSLL"] = " ".PadRight(8 ); 
         dwReturn["VLWKG"] = " ".PadRight(5 ); 
         dwReturn["VLWVERSART"] = " ".PadRight(3 ); 
         dwReturn["VLWSPED"] = " ".PadRight(3 ); 
         dwReturn["VLWTAGE"] = " ".PadRight(3 ); 
         dwReturn["VLWSONDER"] = " ".PadRight(1 ); 
         dwReturn["VLWTARIF1"] = " ".PadRight(8 ); 
         dwReturn["VLWTARIF2"] = " ".PadRight(8 ); 
         dwReturn["VLWTARIF3"] = " ".PadRight(8 ); 
         dwReturn["VLWTARIF4"] = " ".PadRight(8 ); 
         dwReturn["VLWVERPART"] = " ".PadRight(3 ); 
         dwReturn["VLWMAXGEW"] = " ".PadRight(3 ); 
         dwReturn["VLWAUFMSL"] = " ".PadRight(2 ); 
         dwReturn["VLWTPMA"] = " ".PadRight(4 ); 
         dwReturn["VLWLIEFBED"] = " ".PadRight(3 ); 
         dwReturn["VLWSTDLBED"] = " ".PadRight(3 ); 
         dwReturn["VLWLIEFADR"] = " ".PadRight(8 ); 
         dwReturn["VLWELAND"] = " ".PadRight(3 ); 
         dwReturn["VLWEPLZ"] = " ".PadRight(12 ); 
         dwReturn["VLWEORT"] = " ".PadRight(40 ); 
         dwReturn["VLWEBZ"] = " ".PadRight(2 ); 
         dwReturn["VLWECOUNTY"] = " ".PadRight(4 ); 
         dwReturn["VLWECITY"] = " ".PadRight(4 ); 
         dwReturn["VLWFRKOST"] = " ".PadRight(1 ); 
         dwReturn["VLWANTEIL"] = " ".PadRight(5 ); 
         dwReturn["VLWVERS"] = " ".PadRight(3 ); 
         dwReturn["VLWVERSARTU"] = " ".PadRight(3 ); 
         dwReturn["VLWSPEDU"] = " ".PadRight(3 ); 
         dwReturn["VLWRELIEF"] = " ".PadRight(1 ); 
         dwReturn["VLWVERSARTZ"] = " ".PadRight(3 ); 
         dwReturn["VLWSPEDZ"] = " ".PadRight(3 ); 
         dwReturn["VLWZOLL"] = " ".PadRight(1 ); 
         dwReturn["VLWLKZ1"] = " ".PadRight(3 ); 
         dwReturn["VLWPLZ1"] = " ".PadRight(12 ); 
         dwReturn["VLWORT1"] = " ".PadRight(40 ); 
         dwReturn["VLWBZ1"] = " ".PadRight(2 ); 
         dwReturn["VLWCOUNTY1"] = " ".PadRight(4 ); 
         dwReturn["VLWCITY1"] = " ".PadRight(4 ); 
         dwReturn["VLWLKZ2"] = " ".PadRight(3 ); 
         dwReturn["VLWPLZ2"] = " ".PadRight(12 ); 
         dwReturn["VLWORT2"] = " ".PadRight(40 ); 
         dwReturn["VLWBZ2"] = " ".PadRight(2 ); 
         dwReturn["VLWCOUNTY2"] = " ".PadRight(4 ); 
         dwReturn["VLWCITY2"] = " ".PadRight(4 ); 
         dwReturn["VLWLKZ3"] = " ".PadRight(3 ); 
         dwReturn["VLWPLZ3"] = " ".PadRight(12 ); 
         dwReturn["VLWORT3"] = " ".PadRight(40 ); 
         dwReturn["VLWBZ3"] = " ".PadRight(2 ); 
         dwReturn["VLWCOUNTY3"] = " ".PadRight(4 ); 
         dwReturn["VLWCITY3"] = " ".PadRight(4 ); 
         dwReturn["VLWLKZ4"] = " ".PadRight(3 ); 
         dwReturn["VLWPLZ4"] = " ".PadRight(12 ); 
         dwReturn["VLWORT4"] = " ".PadRight(40 ); 
         dwReturn["VLWBZ4"] = " ".PadRight(2 ); 
         dwReturn["VLWCOUNTY4"] = " ".PadRight(4 ); 
         dwReturn["VLWCITY4"] = " ".PadRight(4 ); 
         dwReturn["VLWSPDKDNR"] = " ".PadRight(10 ); 
         dwReturn["VLWFILLER"] = " ".PadRight(100 ); 
         dwReturn["VLWNEUB"] = " ".PadRight(8 ); 
         dwReturn["VLWNEUD"] = " ".PadRight(0 ); 
         dwReturn["VLWAENB"] = " ".PadRight(8 ); 
         dwReturn["VLWAEND"] = " ".PadRight(0 ); 
         dwReturn["VLWAENZL"] = " ".PadRight(0 ); 
                    #endregion
                    break;
                case "JLT":

                    break;
                default:

                    break;
            }
            if (IsConvert)
            {
                foreach (DataColumn cm in dwInput.Table.Columns)
                {
                    if (dwInput[cm.ColumnName].ToString() == "")
                        continue;
                    if (dwReturn.Table.Columns.Contains(cm.ColumnName))
                    {
                        dwReturn[cm.ColumnName] = dwInput[cm.ColumnName];
                    }
                }
            }
            return dwReturn;
        }
        public void MapVLWEG(ref DataRow dwLocal, DataRow dwData)
        {
            BlindMap(ref dwLocal, dwData);
        }
        public void SaveVLWEG(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            DataSet setResult = new DataSet();
            DataTable tbLocal = null;
            DataRow dwLocal = null;
            bool flgExist = false;
            setResult = QueryVLWEG(dwData);
            if (setResult.Tables.Count > 0)
            {
                tbLocal = setResult.Tables[0];
                if (tbLocal.Rows.Count > 0)
                {
                    flgExist = true;
                    dwLocal = tbLocal.Rows[0];
                }
                else
                {
                    dwLocal = tbLocal.NewRow();
                }
            }
            MapVLWEG(ref dwLocal, dwData);

            if (!flgExist)
            {

                InsertVLWEG(dwLocal, ITXDBVERSION);
            }
            UpdateVLWEG(dwLocal);
        }
        public void InsertVLWEG(DataRow dwData, string ITXDBVERSION = "50.24")
        {
            OracleCommand or1;
            or1 = OracleDB.CreateCommand();
            switch (ITXDBVERSION)
            {
                case "YGR":
                    or1.CommandText = "INSERT INTO VLWEG(VAKBMANDANT, VAKBKOLL, VAKBART, VAKBKUNDNR, VAKBFARBE, VAKBKDARTNR, VAKBKDARTBEZ, VAKBKDFARBNR, VAKBANDRUCK, VAKBMEGEW, VAKBMENGEH, VAKBGEWVON, VAKBGEWBIS, VAKBGEWCA, VAKBGEWFKT, VAKBGEWGRP, VAKBMEGFKT, VAKBMEGGRP, VAKBAENDZL, VAKBAENDBEN, VAKBAENDDAT, VAKBNEUBEN, VAKBNEUDAT, VAKBFILLER)"
                        + " VALUES (:VAKBMANDANT, :VAKBKOLL, :VAKBART, :VAKBKUNDNR, :VAKBFARBE, '                         ', '                         ', '                             ', ' ', '   ', '   ', 0, 0, ' ', '000000000000', ' ', '000000000000', ' ', 0, '        ', '000000', '        ', '      ', '                                          ')";
                    or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                //VAFMANDANT VAFKOLL VAFART VAFFARBE VAFBEZ VAFFFARBE

            }
            
            Connect2Proxy(or1);
        }
        public DataSet QueryVLWEG(DataRow dwData, int option = 1)
        {
            DataSet Return;
            DataSet Result = new DataSet();
            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 0:
                    or1.CommandText = "SELECT * FROM VLWEG WHERE  ROWNUM<2 ";
                    break;
              
                case 99:
                    or1.CommandText = "SELECT * FROM VLWEG  WHERE ROWNUM<50";
                    break;
                default:
                    break;
            }
            Result = Connect2Proxy(or1);
            if (Result.Tables.Count > 0)
                Result.Tables[0].TableName = "VLWEG";
            Return = Result;
            return Return;
        }
        public void DeleteVLWEG(DataRow dwData, int option = 1)
        {

            OracleCommand or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    or1.CommandText = "DELETE FROM VLWEG   WHERE  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                     or1.Parameters.Add("VAKBMANDANT", OracleType.NVarChar).Value = dwData["VAKBMANDANT"].ToString();
                    or1.Parameters.Add("VAKBKOLL", OracleType.NVarChar).Value = dwData["VAKBKOLL"].ToString();
                    or1.Parameters.Add("VAKBART", OracleType.NVarChar).Value = dwData["VAKBART"].ToString();
                    or1.Parameters.Add("VAKBFARBE", OracleType.NVarChar).Value = dwData["VAKBFARBE"].ToString();
                    or1.Parameters.Add("VAKBKUNDNR", OracleType.NVarChar).Value = dwData["VAKBKUNDNR"].ToString();
                    break;
                default:
                    break;
            }
            Connect2Proxy(or1);
        } 
      
        public void UpdateVLWEG(DataRow dwData, string ITXDBVERSION = "50.24", int option = 1)
        {
            OracleCommand or1;
            DataSet Result = new DataSet();
            or1 = OracleDB.CreateCommand();
            switch (option)
            {
                case 1:
                    #region====Command==== 
                    or1.CommandText = "UPDATE VLWEG SET "
                    +"VLWMANDANT= :VLWMANDANT,"
                    +"VLWLANDVON= :VLWLANDVON,"
                    +"VLWPLZVON= :VLWPLZVON,"
                    +"VLWLANDAN= :VLWLANDAN,"
                    +"VLWZONE= :VLWZONE,"
                    +"VLWKDVKL= :VLWKDVKL,"
                    +"VLWKUNDNR= :VLWKUNDNR,"
                    +"VLWADRSLL= :VLWADRSLL,"
                    +"VLWKG= :VLWKG,"
                    +"VLWVERSART= :VLWVERSART,"
                    +"VLWSPED= :VLWSPED,"
                    +"VLWTAGE= :VLWTAGE,"
                    +"VLWSONDER= :VLWSONDER,"
                    +"VLWTARIF1= :VLWTARIF1,"
                    +"VLWTARIF2= :VLWTARIF2,"
                    +"VLWTARIF3= :VLWTARIF3,"
                    +"VLWTARIF4= :VLWTARIF4,"
                    +"VLWVERPART= :VLWVERPART,"
                    +"VLWMAXGEW= :VLWMAXGEW,"
                    +"VLWAUFMSL= :VLWAUFMSL,"
                    +"VLWTPMA= :VLWTPMA,"
                    +"VLWLIEFBED= :VLWLIEFBED,"
                    +"VLWSTDLBED= :VLWSTDLBED,"
                    +"VLWLIEFADR= :VLWLIEFADR,"
                    +"VLWELAND= :VLWELAND,"
                    +"VLWEPLZ= :VLWEPLZ,"
                    +"VLWEORT= :VLWEORT,"
                    +"VLWEBZ= :VLWEBZ,"
                    +"VLWECOUNTY= :VLWECOUNTY,"
                    +"VLWECITY= :VLWECITY,"
                    +"VLWFRKOST= :VLWFRKOST,"
                    +"VLWANTEIL= :VLWANTEIL,"
                    +"VLWVERS= :VLWVERS,"
                    +"VLWVERSARTU= :VLWVERSARTU,"
                    +"VLWSPEDU= :VLWSPEDU,"
                    +"VLWRELIEF= :VLWRELIEF,"
                    +"VLWVERSARTZ= :VLWVERSARTZ,"
                    +"VLWSPEDZ= :VLWSPEDZ,"
                    +"VLWZOLL= :VLWZOLL,"
                    +"VLWLKZ1= :VLWLKZ1,"
                    +"VLWPLZ1= :VLWPLZ1,"
                    +"VLWORT1= :VLWORT1,"
                    +"VLWBZ1= :VLWBZ1,"
                    +"VLWCOUNTY1= :VLWCOUNTY1,"
                    +"VLWCITY1= :VLWCITY1,"
                    +"VLWLKZ2= :VLWLKZ2,"
                    +"VLWPLZ2= :VLWPLZ2,"
                    +"VLWORT2= :VLWORT2,"
                    +"VLWBZ2= :VLWBZ2,"
                    +"VLWCOUNTY2= :VLWCOUNTY2,"
                    +"VLWCITY2= :VLWCITY2,"
                    +"VLWLKZ3= :VLWLKZ3,"
                    +"VLWPLZ3= :VLWPLZ3,"
                    +"VLWORT3= :VLWORT3,"
                    +"VLWBZ3= :VLWBZ3,"
                    +"VLWCOUNTY3= :VLWCOUNTY3,"
                    +"VLWCITY3= :VLWCITY3,"
                    +"VLWLKZ4= :VLWLKZ4,"
                    +"VLWPLZ4= :VLWPLZ4,"
                    +"VLWORT4= :VLWORT4,"
                    +"VLWBZ4= :VLWBZ4,"
                    +"VLWCOUNTY4= :VLWCOUNTY4,"
                    +"VLWCITY4= :VLWCITY4,"
                    +"VLWSPDKDNR= :VLWSPDKDNR,"
                    +"VLWFILLER= :VLWFILLER,"
                    +"VLWNEUB= :VLWNEUB,"
                    +"VLWNEUD= :VLWNEUD,"
                    +"VLWAENB= :VLWAENB,"
                    +"VLWAEND= :VLWAEND,"
                    +"VLWAENZL= :VLWAENZL,"
                        + " WHERE  "
                        + "  VAKBMANDANT=:VAKBMANDANT AND VAKBKOLL=:VAKBKOLL AND VAKBART =:VAKBART AND VAKBFARBE=:VAKBFARBE AND VAKBKUNDNR=:VAKBKUNDNR";
                    #endregion

                    #region====Parameters====
          or1.Parameters.Add("VLWMANDANT", OracleType.NVarChar).Value = dwData["VLWMANDANT"].ToString(); 
          or1.Parameters.Add("VLWLANDVON", OracleType.NVarChar).Value = dwData["VLWLANDVON"].ToString(); 
          or1.Parameters.Add("VLWPLZVON", OracleType.NVarChar).Value = dwData["VLWPLZVON"].ToString(); 
          or1.Parameters.Add("VLWLANDAN", OracleType.NVarChar).Value = dwData["VLWLANDAN"].ToString(); 
          or1.Parameters.Add("VLWZONE", OracleType.NVarChar).Value = dwData["VLWZONE"].ToString(); 
          or1.Parameters.Add("VLWKDVKL", OracleType.NVarChar).Value = dwData["VLWKDVKL"].ToString(); 
          or1.Parameters.Add("VLWKUNDNR", OracleType.NVarChar).Value = dwData["VLWKUNDNR"].ToString(); 
          or1.Parameters.Add("VLWADRSLL", OracleType.NVarChar).Value = dwData["VLWADRSLL"].ToString(); 
          or1.Parameters.Add("VLWKG", OracleType.NVarChar).Value = dwData["VLWKG"].ToString(); 
          or1.Parameters.Add("VLWVERSART", OracleType.NVarChar).Value = dwData["VLWVERSART"].ToString(); 
          or1.Parameters.Add("VLWSPED", OracleType.NVarChar).Value = dwData["VLWSPED"].ToString(); 
          or1.Parameters.Add("VLWTAGE", OracleType.NVarChar).Value = dwData["VLWTAGE"].ToString(); 
          or1.Parameters.Add("VLWSONDER", OracleType.NVarChar).Value = dwData["VLWSONDER"].ToString(); 
          or1.Parameters.Add("VLWTARIF1", OracleType.NVarChar).Value = dwData["VLWTARIF1"].ToString(); 
          or1.Parameters.Add("VLWTARIF2", OracleType.NVarChar).Value = dwData["VLWTARIF2"].ToString(); 
          or1.Parameters.Add("VLWTARIF3", OracleType.NVarChar).Value = dwData["VLWTARIF3"].ToString(); 
          or1.Parameters.Add("VLWTARIF4", OracleType.NVarChar).Value = dwData["VLWTARIF4"].ToString(); 
          or1.Parameters.Add("VLWVERPART", OracleType.NVarChar).Value = dwData["VLWVERPART"].ToString(); 
          or1.Parameters.Add("VLWMAXGEW", OracleType.NVarChar).Value = dwData["VLWMAXGEW"].ToString(); 
          or1.Parameters.Add("VLWAUFMSL", OracleType.NVarChar).Value = dwData["VLWAUFMSL"].ToString(); 
          or1.Parameters.Add("VLWTPMA", OracleType.NVarChar).Value = dwData["VLWTPMA"].ToString(); 
          or1.Parameters.Add("VLWLIEFBED", OracleType.NVarChar).Value = dwData["VLWLIEFBED"].ToString(); 
          or1.Parameters.Add("VLWSTDLBED", OracleType.NVarChar).Value = dwData["VLWSTDLBED"].ToString(); 
          or1.Parameters.Add("VLWLIEFADR", OracleType.NVarChar).Value = dwData["VLWLIEFADR"].ToString(); 
          or1.Parameters.Add("VLWELAND", OracleType.NVarChar).Value = dwData["VLWELAND"].ToString(); 
          or1.Parameters.Add("VLWEPLZ", OracleType.NVarChar).Value = dwData["VLWEPLZ"].ToString(); 
          or1.Parameters.Add("VLWEORT", OracleType.NVarChar).Value = dwData["VLWEORT"].ToString(); 
          or1.Parameters.Add("VLWEBZ", OracleType.NVarChar).Value = dwData["VLWEBZ"].ToString(); 
          or1.Parameters.Add("VLWECOUNTY", OracleType.NVarChar).Value = dwData["VLWECOUNTY"].ToString(); 
          or1.Parameters.Add("VLWECITY", OracleType.NVarChar).Value = dwData["VLWECITY"].ToString(); 
          or1.Parameters.Add("VLWFRKOST", OracleType.NVarChar).Value = dwData["VLWFRKOST"].ToString(); 
          or1.Parameters.Add("VLWANTEIL", OracleType.NVarChar).Value = dwData["VLWANTEIL"].ToString(); 
          or1.Parameters.Add("VLWVERS", OracleType.NVarChar).Value = dwData["VLWVERS"].ToString(); 
          or1.Parameters.Add("VLWVERSARTU", OracleType.NVarChar).Value = dwData["VLWVERSARTU"].ToString(); 
          or1.Parameters.Add("VLWSPEDU", OracleType.NVarChar).Value = dwData["VLWSPEDU"].ToString(); 
          or1.Parameters.Add("VLWRELIEF", OracleType.NVarChar).Value = dwData["VLWRELIEF"].ToString(); 
          or1.Parameters.Add("VLWVERSARTZ", OracleType.NVarChar).Value = dwData["VLWVERSARTZ"].ToString(); 
          or1.Parameters.Add("VLWSPEDZ", OracleType.NVarChar).Value = dwData["VLWSPEDZ"].ToString(); 
          or1.Parameters.Add("VLWZOLL", OracleType.NVarChar).Value = dwData["VLWZOLL"].ToString(); 
          or1.Parameters.Add("VLWLKZ1", OracleType.NVarChar).Value = dwData["VLWLKZ1"].ToString(); 
          or1.Parameters.Add("VLWPLZ1", OracleType.NVarChar).Value = dwData["VLWPLZ1"].ToString(); 
          or1.Parameters.Add("VLWORT1", OracleType.NVarChar).Value = dwData["VLWORT1"].ToString(); 
          or1.Parameters.Add("VLWBZ1", OracleType.NVarChar).Value = dwData["VLWBZ1"].ToString(); 
          or1.Parameters.Add("VLWCOUNTY1", OracleType.NVarChar).Value = dwData["VLWCOUNTY1"].ToString(); 
          or1.Parameters.Add("VLWCITY1", OracleType.NVarChar).Value = dwData["VLWCITY1"].ToString(); 
          or1.Parameters.Add("VLWLKZ2", OracleType.NVarChar).Value = dwData["VLWLKZ2"].ToString(); 
          or1.Parameters.Add("VLWPLZ2", OracleType.NVarChar).Value = dwData["VLWPLZ2"].ToString(); 
          or1.Parameters.Add("VLWORT2", OracleType.NVarChar).Value = dwData["VLWORT2"].ToString(); 
          or1.Parameters.Add("VLWBZ2", OracleType.NVarChar).Value = dwData["VLWBZ2"].ToString(); 
          or1.Parameters.Add("VLWCOUNTY2", OracleType.NVarChar).Value = dwData["VLWCOUNTY2"].ToString(); 
          or1.Parameters.Add("VLWCITY2", OracleType.NVarChar).Value = dwData["VLWCITY2"].ToString(); 
          or1.Parameters.Add("VLWLKZ3", OracleType.NVarChar).Value = dwData["VLWLKZ3"].ToString(); 
          or1.Parameters.Add("VLWPLZ3", OracleType.NVarChar).Value = dwData["VLWPLZ3"].ToString(); 
          or1.Parameters.Add("VLWORT3", OracleType.NVarChar).Value = dwData["VLWORT3"].ToString(); 
          or1.Parameters.Add("VLWBZ3", OracleType.NVarChar).Value = dwData["VLWBZ3"].ToString(); 
          or1.Parameters.Add("VLWCOUNTY3", OracleType.NVarChar).Value = dwData["VLWCOUNTY3"].ToString(); 
          or1.Parameters.Add("VLWCITY3", OracleType.NVarChar).Value = dwData["VLWCITY3"].ToString(); 
          or1.Parameters.Add("VLWLKZ4", OracleType.NVarChar).Value = dwData["VLWLKZ4"].ToString(); 
          or1.Parameters.Add("VLWPLZ4", OracleType.NVarChar).Value = dwData["VLWPLZ4"].ToString(); 
          or1.Parameters.Add("VLWORT4", OracleType.NVarChar).Value = dwData["VLWORT4"].ToString(); 
          or1.Parameters.Add("VLWBZ4", OracleType.NVarChar).Value = dwData["VLWBZ4"].ToString(); 
          or1.Parameters.Add("VLWCOUNTY4", OracleType.NVarChar).Value = dwData["VLWCOUNTY4"].ToString(); 
          or1.Parameters.Add("VLWCITY4", OracleType.NVarChar).Value = dwData["VLWCITY4"].ToString(); 
          or1.Parameters.Add("VLWSPDKDNR", OracleType.NVarChar).Value = dwData["VLWSPDKDNR"].ToString(); 
          or1.Parameters.Add("VLWFILLER", OracleType.NVarChar).Value = dwData["VLWFILLER"].ToString(); 
          or1.Parameters.Add("VLWNEUB", OracleType.NVarChar).Value = dwData["VLWNEUB"].ToString(); 
          or1.Parameters.Add("VLWNEUD", OracleType.NVarChar).Value = dwData["VLWNEUD"].ToString(); 
          or1.Parameters.Add("VLWAENB", OracleType.NVarChar).Value = dwData["VLWAENB"].ToString(); 
          or1.Parameters.Add("VLWAEND", OracleType.NVarChar).Value = dwData["VLWAEND"].ToString(); 
          or1.Parameters.Add("VLWAENZL", OracleType.NVarChar).Value = dwData["VLWAENZL"].ToString(); 
                    #endregion
                    break; 
                default:
                    break;
            }


            Connect2Proxy(or1);
        }
    }
}
